using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace VirtualManagerSA
{
	/// <summary>
	/// This class is the form that allows employees to set their availability, 
	/// shift preference, time preference, and request days off.
	/// </summary>
	public class EmployeePrefs : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.DateTimePicker dateTimePicker1;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.CheckBox sundayAMBox;
		private System.Windows.Forms.CheckBox mondayAMBox;
		private System.Windows.Forms.CheckBox tuesdayAMBox;
		private System.Windows.Forms.CheckBox wednesdayAMBox;
		private System.Windows.Forms.CheckBox thursdayAMBox;
		private System.Windows.Forms.CheckBox fridayAMBox;
		private System.Windows.Forms.CheckBox saturdayAMBox;
		private System.Windows.Forms.GroupBox availabilityGroup;
		private System.Windows.Forms.CheckBox fridayPMBox;
		private System.Windows.Forms.CheckBox sundayPMBox;
		private System.Windows.Forms.CheckBox mondayPMBox;
		private System.Windows.Forms.CheckBox saturdayPMBox;
		private System.Windows.Forms.CheckBox wednesdayPMBox;
		private System.Windows.Forms.CheckBox thursdayPMBox;
		private System.Windows.Forms.CheckBox tuesdayPMBox;
		private System.Windows.Forms.GroupBox preferenceGroup;
		private System.Windows.Forms.Panel typePane;
		private System.Windows.Forms.RadioButton typeSingleRadio;
		private System.Windows.Forms.RadioButton typeNoPrefRadio;
		private System.Windows.Forms.RadioButton typeDoubleRadio;
		private System.Windows.Forms.GroupBox daysOffGroup;
		private System.Windows.Forms.Button dayAddButton;
		private System.Windows.Forms.ListBox dayList;
		private System.Windows.Forms.Button dayRemoveButton;
		private System.Windows.Forms.Panel timePane;
		private System.Windows.Forms.RadioButton timeAMRadio;
		private System.Windows.Forms.RadioButton timeNoPrefRadio;
		private System.Windows.Forms.RadioButton timePMRadio;
		private System.Windows.Forms.Button saveButton;
		private System.Windows.Forms.Button cancelButton;
		private System.Windows.Forms.Button deselectButton;
		private System.Windows.Forms.Button selectButton;
		Session ses;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public EmployeePrefs()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		public EmployeePrefs(Session s) 
		{
			InitializeComponent();
			ses = s;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			this.Owner.Visible = true;
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.availabilityGroup = new System.Windows.Forms.GroupBox();
			this.deselectButton = new System.Windows.Forms.Button();
			this.label9 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.sundayAMBox = new System.Windows.Forms.CheckBox();
			this.mondayAMBox = new System.Windows.Forms.CheckBox();
			this.tuesdayAMBox = new System.Windows.Forms.CheckBox();
			this.wednesdayAMBox = new System.Windows.Forms.CheckBox();
			this.thursdayAMBox = new System.Windows.Forms.CheckBox();
			this.fridayAMBox = new System.Windows.Forms.CheckBox();
			this.saturdayAMBox = new System.Windows.Forms.CheckBox();
			this.fridayPMBox = new System.Windows.Forms.CheckBox();
			this.sundayPMBox = new System.Windows.Forms.CheckBox();
			this.mondayPMBox = new System.Windows.Forms.CheckBox();
			this.saturdayPMBox = new System.Windows.Forms.CheckBox();
			this.wednesdayPMBox = new System.Windows.Forms.CheckBox();
			this.thursdayPMBox = new System.Windows.Forms.CheckBox();
			this.tuesdayPMBox = new System.Windows.Forms.CheckBox();
			this.selectButton = new System.Windows.Forms.Button();
			this.preferenceGroup = new System.Windows.Forms.GroupBox();
			this.label11 = new System.Windows.Forms.Label();
			this.typePane = new System.Windows.Forms.Panel();
			this.typeSingleRadio = new System.Windows.Forms.RadioButton();
			this.typeNoPrefRadio = new System.Windows.Forms.RadioButton();
			this.typeDoubleRadio = new System.Windows.Forms.RadioButton();
			this.daysOffGroup = new System.Windows.Forms.GroupBox();
			this.dayAddButton = new System.Windows.Forms.Button();
			this.dayList = new System.Windows.Forms.ListBox();
			this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
			this.dayRemoveButton = new System.Windows.Forms.Button();
			this.label10 = new System.Windows.Forms.Label();
			this.timePane = new System.Windows.Forms.Panel();
			this.timeAMRadio = new System.Windows.Forms.RadioButton();
			this.timeNoPrefRadio = new System.Windows.Forms.RadioButton();
			this.timePMRadio = new System.Windows.Forms.RadioButton();
			this.saveButton = new System.Windows.Forms.Button();
			this.cancelButton = new System.Windows.Forms.Button();
			this.availabilityGroup.SuspendLayout();
			this.preferenceGroup.SuspendLayout();
			this.typePane.SuspendLayout();
			this.daysOffGroup.SuspendLayout();
			this.timePane.SuspendLayout();
			this.SuspendLayout();
			// 
			// availabilityGroup
			// 
			this.availabilityGroup.Controls.Add(this.deselectButton);
			this.availabilityGroup.Controls.Add(this.label9);
			this.availabilityGroup.Controls.Add(this.label8);
			this.availabilityGroup.Controls.Add(this.label7);
			this.availabilityGroup.Controls.Add(this.label6);
			this.availabilityGroup.Controls.Add(this.label5);
			this.availabilityGroup.Controls.Add(this.label4);
			this.availabilityGroup.Controls.Add(this.label3);
			this.availabilityGroup.Controls.Add(this.label2);
			this.availabilityGroup.Controls.Add(this.label1);
			this.availabilityGroup.Controls.Add(this.sundayAMBox);
			this.availabilityGroup.Controls.Add(this.mondayAMBox);
			this.availabilityGroup.Controls.Add(this.tuesdayAMBox);
			this.availabilityGroup.Controls.Add(this.wednesdayAMBox);
			this.availabilityGroup.Controls.Add(this.thursdayAMBox);
			this.availabilityGroup.Controls.Add(this.fridayAMBox);
			this.availabilityGroup.Controls.Add(this.saturdayAMBox);
			this.availabilityGroup.Controls.Add(this.fridayPMBox);
			this.availabilityGroup.Controls.Add(this.sundayPMBox);
			this.availabilityGroup.Controls.Add(this.mondayPMBox);
			this.availabilityGroup.Controls.Add(this.saturdayPMBox);
			this.availabilityGroup.Controls.Add(this.wednesdayPMBox);
			this.availabilityGroup.Controls.Add(this.thursdayPMBox);
			this.availabilityGroup.Controls.Add(this.tuesdayPMBox);
			this.availabilityGroup.Controls.Add(this.selectButton);
			this.availabilityGroup.Location = new System.Drawing.Point(8, 8);
			this.availabilityGroup.Name = "availabilityGroup";
			this.availabilityGroup.Size = new System.Drawing.Size(272, 136);
			this.availabilityGroup.TabIndex = 0;
			this.availabilityGroup.TabStop = false;
			this.availabilityGroup.Text = "Availability";
			// 
			// deselectButton
			// 
			this.deselectButton.Location = new System.Drawing.Point(40, 96);
			this.deselectButton.Name = "deselectButton";
			this.deselectButton.Size = new System.Drawing.Size(88, 24);
			this.deselectButton.TabIndex = 10;
			this.deselectButton.Text = "Deselect All";
			this.deselectButton.Click += new System.EventHandler(this.deselectButton_Click);
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(208, 32);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(16, 16);
			this.label9.TabIndex = 9;
			this.label9.Text = "S";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(184, 32);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(16, 16);
			this.label8.TabIndex = 8;
			this.label8.Text = "F";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(160, 32);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(16, 16);
			this.label7.TabIndex = 7;
			this.label7.Text = "T";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(136, 32);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(16, 16);
			this.label6.TabIndex = 6;
			this.label6.Text = "W";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(112, 32);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(16, 16);
			this.label5.TabIndex = 5;
			this.label5.Text = "T";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(88, 32);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(16, 16);
			this.label4.TabIndex = 4;
			this.label4.Text = "M";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(64, 32);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(16, 16);
			this.label3.TabIndex = 3;
			this.label3.Text = "S";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(40, 72);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(24, 16);
			this.label2.TabIndex = 2;
			this.label2.Text = "PM";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(40, 48);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(24, 16);
			this.label1.TabIndex = 1;
			this.label1.Text = "AM";
			// 
			// sundayAMBox
			// 
			this.sundayAMBox.Location = new System.Drawing.Point(64, 48);
			this.sundayAMBox.Name = "sundayAMBox";
			this.sundayAMBox.Size = new System.Drawing.Size(16, 16);
			this.sundayAMBox.TabIndex = 0;
			// 
			// mondayAMBox
			// 
			this.mondayAMBox.Location = new System.Drawing.Point(88, 48);
			this.mondayAMBox.Name = "mondayAMBox";
			this.mondayAMBox.Size = new System.Drawing.Size(16, 16);
			this.mondayAMBox.TabIndex = 0;
			// 
			// tuesdayAMBox
			// 
			this.tuesdayAMBox.Location = new System.Drawing.Point(112, 48);
			this.tuesdayAMBox.Name = "tuesdayAMBox";
			this.tuesdayAMBox.Size = new System.Drawing.Size(16, 16);
			this.tuesdayAMBox.TabIndex = 0;
			// 
			// wednesdayAMBox
			// 
			this.wednesdayAMBox.Location = new System.Drawing.Point(136, 48);
			this.wednesdayAMBox.Name = "wednesdayAMBox";
			this.wednesdayAMBox.Size = new System.Drawing.Size(16, 16);
			this.wednesdayAMBox.TabIndex = 0;
			// 
			// thursdayAMBox
			// 
			this.thursdayAMBox.Location = new System.Drawing.Point(160, 48);
			this.thursdayAMBox.Name = "thursdayAMBox";
			this.thursdayAMBox.Size = new System.Drawing.Size(16, 16);
			this.thursdayAMBox.TabIndex = 0;
			// 
			// fridayAMBox
			// 
			this.fridayAMBox.Location = new System.Drawing.Point(184, 48);
			this.fridayAMBox.Name = "fridayAMBox";
			this.fridayAMBox.Size = new System.Drawing.Size(16, 16);
			this.fridayAMBox.TabIndex = 0;
			// 
			// saturdayAMBox
			// 
			this.saturdayAMBox.Location = new System.Drawing.Point(208, 48);
			this.saturdayAMBox.Name = "saturdayAMBox";
			this.saturdayAMBox.Size = new System.Drawing.Size(16, 16);
			this.saturdayAMBox.TabIndex = 0;
			// 
			// fridayPMBox
			// 
			this.fridayPMBox.Location = new System.Drawing.Point(184, 72);
			this.fridayPMBox.Name = "fridayPMBox";
			this.fridayPMBox.Size = new System.Drawing.Size(16, 16);
			this.fridayPMBox.TabIndex = 0;
			// 
			// sundayPMBox
			// 
			this.sundayPMBox.Location = new System.Drawing.Point(64, 72);
			this.sundayPMBox.Name = "sundayPMBox";
			this.sundayPMBox.Size = new System.Drawing.Size(16, 16);
			this.sundayPMBox.TabIndex = 0;
			// 
			// mondayPMBox
			// 
			this.mondayPMBox.Location = new System.Drawing.Point(88, 72);
			this.mondayPMBox.Name = "mondayPMBox";
			this.mondayPMBox.Size = new System.Drawing.Size(16, 16);
			this.mondayPMBox.TabIndex = 0;
			// 
			// saturdayPMBox
			// 
			this.saturdayPMBox.Location = new System.Drawing.Point(208, 72);
			this.saturdayPMBox.Name = "saturdayPMBox";
			this.saturdayPMBox.Size = new System.Drawing.Size(16, 16);
			this.saturdayPMBox.TabIndex = 0;
			// 
			// wednesdayPMBox
			// 
			this.wednesdayPMBox.Location = new System.Drawing.Point(136, 72);
			this.wednesdayPMBox.Name = "wednesdayPMBox";
			this.wednesdayPMBox.Size = new System.Drawing.Size(16, 16);
			this.wednesdayPMBox.TabIndex = 0;
			// 
			// thursdayPMBox
			// 
			this.thursdayPMBox.Location = new System.Drawing.Point(160, 72);
			this.thursdayPMBox.Name = "thursdayPMBox";
			this.thursdayPMBox.Size = new System.Drawing.Size(16, 16);
			this.thursdayPMBox.TabIndex = 0;
			// 
			// tuesdayPMBox
			// 
			this.tuesdayPMBox.Location = new System.Drawing.Point(112, 72);
			this.tuesdayPMBox.Name = "tuesdayPMBox";
			this.tuesdayPMBox.Size = new System.Drawing.Size(16, 16);
			this.tuesdayPMBox.TabIndex = 0;
			// 
			// selectButton
			// 
			this.selectButton.Location = new System.Drawing.Point(144, 96);
			this.selectButton.Name = "selectButton";
			this.selectButton.Size = new System.Drawing.Size(88, 24);
			this.selectButton.TabIndex = 10;
			this.selectButton.Text = "Select All";
			this.selectButton.Click += new System.EventHandler(this.selectButton_Click);
			// 
			// preferenceGroup
			// 
			this.preferenceGroup.Controls.Add(this.label11);
			this.preferenceGroup.Controls.Add(this.typePane);
			this.preferenceGroup.Location = new System.Drawing.Point(8, 152);
			this.preferenceGroup.Name = "preferenceGroup";
			this.preferenceGroup.Size = new System.Drawing.Size(272, 104);
			this.preferenceGroup.TabIndex = 1;
			this.preferenceGroup.TabStop = false;
			this.preferenceGroup.Text = "Preferences";
			// 
			// label11
			// 
			this.label11.Location = new System.Drawing.Point(168, 24);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(40, 16);
			this.label11.TabIndex = 5;
			this.label11.Text = "Type:";
			// 
			// typePane
			// 
			this.typePane.Controls.Add(this.typeSingleRadio);
			this.typePane.Controls.Add(this.typeNoPrefRadio);
			this.typePane.Controls.Add(this.typeDoubleRadio);
			this.typePane.Location = new System.Drawing.Point(144, 32);
			this.typePane.Name = "typePane";
			this.typePane.Size = new System.Drawing.Size(104, 64);
			this.typePane.TabIndex = 3;
			// 
			// typeSingleRadio
			// 
			this.typeSingleRadio.Location = new System.Drawing.Point(8, 8);
			this.typeSingleRadio.Name = "typeSingleRadio";
			this.typeSingleRadio.Size = new System.Drawing.Size(56, 16);
			this.typeSingleRadio.TabIndex = 0;
			this.typeSingleRadio.Text = "Single";
			this.typeSingleRadio.CheckedChanged += new System.EventHandler(this.typeSingleRadio_CheckedChanged);
			// 
			// typeNoPrefRadio
			// 
			this.typeNoPrefRadio.Location = new System.Drawing.Point(8, 40);
			this.typeNoPrefRadio.Name = "typeNoPrefRadio";
			this.typeNoPrefRadio.Size = new System.Drawing.Size(96, 16);
			this.typeNoPrefRadio.TabIndex = 0;
			this.typeNoPrefRadio.Text = "No Preference";
			// 
			// typeDoubleRadio
			// 
			this.typeDoubleRadio.Location = new System.Drawing.Point(8, 24);
			this.typeDoubleRadio.Name = "typeDoubleRadio";
			this.typeDoubleRadio.Size = new System.Drawing.Size(64, 16);
			this.typeDoubleRadio.TabIndex = 0;
			this.typeDoubleRadio.Text = "Double";
			// 
			// daysOffGroup
			// 
			this.daysOffGroup.Controls.Add(this.dayAddButton);
			this.daysOffGroup.Controls.Add(this.dayList);
			this.daysOffGroup.Controls.Add(this.dateTimePicker1);
			this.daysOffGroup.Controls.Add(this.dayRemoveButton);
			this.daysOffGroup.Location = new System.Drawing.Point(8, 264);
			this.daysOffGroup.Name = "daysOffGroup";
			this.daysOffGroup.Size = new System.Drawing.Size(272, 128);
			this.daysOffGroup.TabIndex = 2;
			this.daysOffGroup.TabStop = false;
			this.daysOffGroup.Text = "Days Off";
			// 
			// dayAddButton
			// 
			this.dayAddButton.Location = new System.Drawing.Point(184, 56);
			this.dayAddButton.Name = "dayAddButton";
			this.dayAddButton.Size = new System.Drawing.Size(80, 24);
			this.dayAddButton.TabIndex = 2;
			this.dayAddButton.Text = "Add";
			this.dayAddButton.Click += new System.EventHandler(this.dayAddButton_Click);
			// 
			// dayList
			// 
			this.dayList.Location = new System.Drawing.Point(16, 56);
			this.dayList.Name = "dayList";
			this.dayList.Size = new System.Drawing.Size(160, 56);
			this.dayList.TabIndex = 1;
			// 
			// dateTimePicker1
			// 
			this.dateTimePicker1.Location = new System.Drawing.Point(16, 24);
			this.dateTimePicker1.Name = "dateTimePicker1";
			this.dateTimePicker1.Size = new System.Drawing.Size(240, 20);
			this.dateTimePicker1.TabIndex = 0;
			// 
			// dayRemoveButton
			// 
			this.dayRemoveButton.Location = new System.Drawing.Point(184, 88);
			this.dayRemoveButton.Name = "dayRemoveButton";
			this.dayRemoveButton.Size = new System.Drawing.Size(80, 24);
			this.dayRemoveButton.TabIndex = 2;
			this.dayRemoveButton.Text = "Remove";
			this.dayRemoveButton.Click += new System.EventHandler(this.dayRemoveButton_Click);
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(56, 176);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(40, 16);
			this.label10.TabIndex = 6;
			this.label10.Text = "Time:";
			// 
			// timePane
			// 
			this.timePane.Controls.Add(this.timeAMRadio);
			this.timePane.Controls.Add(this.timeNoPrefRadio);
			this.timePane.Controls.Add(this.timePMRadio);
			this.timePane.Location = new System.Drawing.Point(32, 184);
			this.timePane.Name = "timePane";
			this.timePane.Size = new System.Drawing.Size(104, 64);
			this.timePane.TabIndex = 4;
			// 
			// timeAMRadio
			// 
			this.timeAMRadio.Location = new System.Drawing.Point(8, 8);
			this.timeAMRadio.Name = "timeAMRadio";
			this.timeAMRadio.Size = new System.Drawing.Size(48, 16);
			this.timeAMRadio.TabIndex = 0;
			this.timeAMRadio.Text = "AM";
			this.timeAMRadio.CheckedChanged += new System.EventHandler(this.timeAMRadio_CheckedChanged);
			// 
			// timeNoPrefRadio
			// 
			this.timeNoPrefRadio.Location = new System.Drawing.Point(8, 40);
			this.timeNoPrefRadio.Name = "timeNoPrefRadio";
			this.timeNoPrefRadio.Size = new System.Drawing.Size(96, 16);
			this.timeNoPrefRadio.TabIndex = 0;
			this.timeNoPrefRadio.Text = "No Preference";
			// 
			// timePMRadio
			// 
			this.timePMRadio.Location = new System.Drawing.Point(8, 24);
			this.timePMRadio.Name = "timePMRadio";
			this.timePMRadio.Size = new System.Drawing.Size(48, 16);
			this.timePMRadio.TabIndex = 0;
			this.timePMRadio.Text = "PM";
			// 
			// saveButton
			// 
			this.saveButton.Location = new System.Drawing.Point(8, 408);
			this.saveButton.Name = "saveButton";
			this.saveButton.Size = new System.Drawing.Size(136, 24);
			this.saveButton.TabIndex = 7;
			this.saveButton.Text = "Save";
			this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
			// 
			// cancelButton
			// 
			this.cancelButton.Location = new System.Drawing.Point(152, 408);
			this.cancelButton.Name = "cancelButton";
			this.cancelButton.Size = new System.Drawing.Size(128, 24);
			this.cancelButton.TabIndex = 7;
			this.cancelButton.Text = "Cancel";
			this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
			// 
			// EmployeePrefs
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(288, 438);
			this.Controls.Add(this.saveButton);
			this.Controls.Add(this.label10);
			this.Controls.Add(this.timePane);
			this.Controls.Add(this.daysOffGroup);
			this.Controls.Add(this.preferenceGroup);
			this.Controls.Add(this.availabilityGroup);
			this.Controls.Add(this.cancelButton);
			this.Name = "EmployeePrefs";
			this.Text = "Employee Preferences";
			this.Load += new System.EventHandler(this.EmployeePrefs_Load);
			this.availabilityGroup.ResumeLayout(false);
			this.preferenceGroup.ResumeLayout(false);
			this.typePane.ResumeLayout(false);
			this.daysOffGroup.ResumeLayout(false);
			this.timePane.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		
		private void saturdayAMBox_CheckedChanged(object sender, System.EventArgs e)
		{
		
		}

		private void typeSingleRadio_CheckedChanged(object sender, System.EventArgs e)
		{
			
		}

		private void timeAMRadio_CheckedChanged(object sender, System.EventArgs e)
		{
		
		}

		

		private void dayAddButton_Click(object sender, System.EventArgs e)
		{
			//Check whether or not it already is in there.
			string s = dateTimePicker1.Text;

			for (int i = 0; i < dayList.Items.Count; i++) 
			{
				if (dayList.Items[i].Equals(s)) 
				{
					return;
				}
			}
			dayList.Items.Add(s);
		}

		private void dayRemoveButton_Click(object sender, System.EventArgs e)
		{
			//Put in something to check whether or not anything is selected at all.
			if (dayList.SelectedIndices.Count > 0) 
			{
				int index = dayList.SelectedIndex;
				dayList.Items.RemoveAt(index);
			}
		}

		private void cancelButton_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void deselectButton_Click(object sender, System.EventArgs e)
		{
			mondayAMBox.Checked = false;
			mondayPMBox.Checked = false;
			tuesdayAMBox.Checked = false;
			tuesdayPMBox.Checked = false;
			wednesdayAMBox.Checked = false;
			wednesdayPMBox.Checked = false;
			thursdayAMBox.Checked = false;
			thursdayPMBox.Checked = false;
			fridayAMBox.Checked = false;
			fridayPMBox.Checked = false;
			saturdayAMBox.Checked = false;
			saturdayPMBox.Checked = false;
			sundayAMBox.Checked = false;
			sundayPMBox.Checked = false;
		}

		private void selectButton_Click(object sender, System.EventArgs e)
		{
			mondayAMBox.Checked = true;
			mondayPMBox.Checked = true;
			tuesdayAMBox.Checked = true;
			tuesdayPMBox.Checked = true;
			wednesdayAMBox.Checked = true;
			wednesdayPMBox.Checked = true;
			thursdayAMBox.Checked = true;
			thursdayPMBox.Checked = true;
			fridayAMBox.Checked = true;
			fridayPMBox.Checked = true;
			saturdayAMBox.Checked = true;
			saturdayPMBox.Checked = true;
			sundayAMBox.Checked = true;
			sundayPMBox.Checked = true;
		}

		private void EmployeePrefs_Load(object sender, System.EventArgs e)
		{
			//We need to load the previous values of all the employee preferences.
			//First, fill out the availability char.
			string avail = ses.getEmployee().getAvailability();
			if (avail != null) 
			{
				bool[] availArray = new bool[14];
				for (int i = 0; i < 14; i++) 
				{
					if (avail[i] == '0') 
					{
						availArray[i] = false;
					} 
					else 
					{
						availArray[i] = true;
					}
				}
				sundayAMBox.Checked = availArray[0];
				sundayPMBox.Checked = availArray[1];
				mondayAMBox.Checked = availArray[2];
				mondayPMBox.Checked = availArray[3];
				tuesdayAMBox.Checked = availArray[4];
				tuesdayPMBox.Checked = availArray[5];
				wednesdayAMBox.Checked = availArray[6];
				wednesdayPMBox.Checked = availArray[7];
				thursdayAMBox.Checked = availArray[8];
				thursdayPMBox.Checked = availArray[9];
				fridayAMBox.Checked = availArray[10];
				fridayPMBox.Checked = availArray[11];
				saturdayAMBox.Checked = availArray[12];
				saturdayPMBox.Checked = availArray[13];
			}
			//Second, do the timey thing.
			string t = ses.getEmployee().getTimes();
			if (t !=null) 
			{
				if (t[0] == '0') 
				{
					timeAMRadio.Checked = true;
				} 
				else if (t[0] == '1') 
				{
					timePMRadio.Checked = true;
				} 
				else if (t[0] == '2') 
				{
					timeNoPrefRadio.Checked = true;
				}
			}
			//Third, do the shifty thing.
			string s = ses.getEmployee().getShifts();
			if (s != null) 
			{
				if (s[0] == '0') 
				{
					typeSingleRadio.Checked = true;
				} 
				else if (s[0] == '1') 
				{
					typeDoubleRadio.Checked = true;
				} 
				else if (s[0] == '2')
				{
					typeNoPrefRadio.Checked = true;
				}
			}
			//Now, THIS is the hard part. Days off time. This is hard on the algorithm.
			ArrayList a = ses.getDaysOff(ses.getEmployee().getId());;
			if (a != null) 
			{
				for (int i = 0; i < a.Count; i++) 
				{
					dayList.Items.Add(a[i].ToString());
				}
			}
		}

		private void saveButton_Click(object sender, System.EventArgs e)
		{
			//In this step, we need to commit the changes from all areas.
			string avail = "";
			bool[] availChecked = new bool[14];
			availChecked[0] = sundayAMBox.Checked;
			availChecked[1] = sundayPMBox.Checked;
			availChecked[2] = mondayAMBox.Checked;
			availChecked[3] = mondayPMBox.Checked;
			availChecked[4] = tuesdayAMBox.Checked;
			availChecked[5] = tuesdayPMBox.Checked;
			availChecked[6] = wednesdayAMBox.Checked;
			availChecked[7] = wednesdayPMBox.Checked;
			availChecked[8] = thursdayAMBox.Checked;
			availChecked[9] = thursdayPMBox.Checked;
			availChecked[10] = fridayAMBox.Checked;
			availChecked[11] = fridayPMBox.Checked;
			availChecked[12] = saturdayAMBox.Checked;
			availChecked[13] = saturdayPMBox.Checked;
			int[] available = new int[14];
			for (int i = 0; i < 14; i++) 
			{
				if (availChecked[i]) 
				{
					available[i] = 1;
				} 
				else 
				{
					available[i] = 0;
				}
			}
			for (int i = 0; i < 14; i++) 
			{
				avail = avail+""+available[i];
			}
			ses.getEmployee().setAvailability(avail);
			if (timeAMRadio.Checked) 
			{
				ses.getEmployee().setTimes("0");
			} 
			else if (timePMRadio.Checked) 
			{
				ses.getEmployee().setTimes("1");
			} 
			else if (timeNoPrefRadio.Checked) 
			{
				ses.getEmployee().setTimes("2");
			}
			if (typeSingleRadio.Checked) 
			{
				ses.getEmployee().setShifts("0");
			} 
			else if (typeDoubleRadio.Checked) 
			{
				ses.getEmployee().setShifts("1");
			} 
			else if (typeNoPrefRadio.Checked) 
			{
				ses.getEmployee().setShifts("2");
			}
			ses.update();
			//Now, THIS is the hard part. Again. Do up the days off.
			string[] daysOffArray = new string[dayList.Items.Count];
			for (int i = 0; i < dayList.Items.Count; i++) 
			{
				daysOffArray[i] = dayList.Items[i].ToString();
			}
			ses.setDaysOff(daysOffArray,dayList.Items.Count);
			this.Close();
		}
	}
}
